Skip to content

arch/risc-v/espressif: Add touch sensor support for esp32[-p4]#18896

Merged
xiaoxiang781216 merged 3 commits into
apache:masterfrom
eren-terzioglu:feature/esp_riscv_touch_sensor
May 19, 2026
Merged

arch/risc-v/espressif: Add touch sensor support for esp32[-p4]#18896
xiaoxiang781216 merged 3 commits into
apache:masterfrom
eren-terzioglu:feature/esp_riscv_touch_sensor

Conversation

@eren-terzioglu
Copy link
Copy Markdown
Contributor

Summary

  • Docs/platforms/esp32p4: Add touch sensor docs

Add touch sensor docs for esp32[-p4]

  • boards/risc-v/esp32p4: Add touch sensor board support for esp32[-p4]

Add touch sensor board support for esp32p4

  • arch/risc-v/espressif: Add touch sensor support for esp32[-p4]

Add touch sensor support for esp32p4

Impact

Impact on user: Yes, touch sensor can be used with esp32p4

Impact on build: No

Impact on hardware: Yes, touch sensor is supported for esp32p4

Impact on documentation: Yes, related docs added

Impact on security: No

Impact on compatibility: No

Testing

esp32p4-function-ev-board:buttons config used with these options

CONFIG_ESPRESSIF_TOUCH=y
CONFIG_ESP_TOUCH_CHANNEL1=y
CONFIG_ESP_TOUCH_IRQ=y

Building

Command to build

make distclean && ./tools/configure.sh esp32p4-function-ev-board:buttons && kconfig-tweak -e CONFIG_ESPRESSIF_TOUCH && kconfig-tweak -e CONFIG_ESP_TOUCH_CHANNEL1 && kconfig-tweak -e CONFIG_ESP_TOUCH_IRQ && make olddefconfig && make -j && make download ESPTOOL_PORT=/dev/ttyUSB0

Running

buttons example run and then touched to the GPIO2 pin

Results

Output should look like this:

nsh> buttons
buttons_main: Starting the button_daemon
btn_supported: NUM_BUTTONS: 02
board_buttons: Reading button 0
board_buttons: b=0 n=0
board_buttons: Reading button 1
board_buttons: b=0 n=0
btn_enable: press: 0f release: 0f handler: 0x40021da0 arg: 0x4ff2b6d0
board_button_irq: Attach 0x400218b0 to touch pad 1
btn_supported: NUM_BUTTONS: 02
btn_enable: press: 0f release: 0f handler: 0x40021da0 arg: 0x4ff2b6d0
board_button_irq: Attach 0x400218b0 to touch pad 1
buttons_main: button_daemon started
button_daemon: Running
button_daemon: Opening /dev/buttons
button_daemon: Supported BUTTONs 0x03
nsh> board_buttons: Reading button 0
board_buttons: b=0 n=0
board_buttons: Reading button 1
board_buttons: b=0 n=0
btn_supported: NUM_BUTTONS: 02
BUTTON1 was pressed

Add touch sensor support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
linguini1
linguini1 previously approved these changes May 18, 2026
Comment thread boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_buttons.c Outdated
@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: risc-v labels May 18, 2026
@eren-terzioglu eren-terzioglu force-pushed the feature/esp_riscv_touch_sensor branch from f3e0118 to 38fba3a Compare May 18, 2026 15:18
@eren-terzioglu
Copy link
Copy Markdown
Contributor Author

Thanks @xiaoxiang781216, updated.

Add touch sensor board support for esp32p4

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
Add touch sensor docs for esp32[-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
@eren-terzioglu
Copy link
Copy Markdown
Contributor Author

Error seems unrelated to this PR.

@xiaoxiang781216 xiaoxiang781216 merged commit 306de5b into apache:master May 19, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Area: Documentation Improvements or additions to documentation Board: risc-v Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants